#!/sbin/openrc-run

# Sample init.d file for alpine linux.

name=repeater
daemon=/usr/bin/$name

depend() {
	need net
	after firewall
}

start() {
	ebegin "Starting VNC ${name}"
		start-stop-daemon --start --quiet \
			--pidfile /var/run/${name}.pid \
			--make-pidfile --background \
			--wait ${uvncrepeater_wait:-500} \
			--stderr ${uvncrepeater_logfile:-/dev/null} \
			--stdout /dev/null \
			--exec ${daemon} -- /etc/uvncrepeater.ini
	eend $?
}

stop() {
	ebegin "Stopping VNC ${name}"
		start-stop-daemon --stop --quiet \
			--pidfile /var/run/$name.pid \
			--exec ${daemon}
	eend $?
}

